package com.xma.springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author: arthur
 * @License: (C) Copyright 2020-2028, xxx Corporation Limited.
 * @Contact: 413911174@qq.com
 * @Date: 2020/6/25 19:10
 * @Version: 1.0
 * @Description:
 */
@RestController
@RequestMapping("/consumer")
public class OrderZKController {

    public static final String INVOKE_URL = "http://cloud-provider-payment6";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/payment/zk")
    public String paymentInfo(){
        String result = restTemplate.getForObject(INVOKE_URL+ "/payment/zk",String.class);
        return result;
    }

}
